{*
SPDX-FileCopyrightText: © 2021 Olivier Meunier <olivier@neokraft.net>

SPDX-License-Identifier: AGPL-3.0-only
*}
{{- import "./_libs/blocks" -}}
{{- import "./_libs/common" -}}
<!DOCTYPE html>
<html lang="en" class="overscroll-none scroll-pt-20 max-sm:scroll-pt-40">
<head>
  <meta charset="UTF-8">
  <title>{{ yield title() }} - Readeck</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="x-csrf-token" content="{{ csrfToken }}" />
  <meta name="csp-nonce" content="{{ cspNonce }}" />
  <meta name="robots" content="noindex nofollow noarchive">

  <link rel="stylesheet" href="{{ assetURL(`bundle.css`) }}" nonce="{{ cspNonce }}">
  <script type="module" src="{{ assetURL(`bundle.js`) }}" nonce="{{ cspNonce }}"></script>
  <script nonce="{{ cspNonce }}">
  if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
    document.documentElement.classList.add('dark')
  } else {
    document.documentElement.classList.remove('dark')
  }
  </script>

  <link rel="icon" href="{{ assetURL(`img/fi/favicon.ico`) }}" sizes="48x48">
  <link rel="icon" href="{{ assetURL(`img/fi/favicon.svg`) }}" sizes="any" type="image/svg+xml">
  <link rel="apple-touch-icon" href="{{ assetURL(`img/fi/apple-touch-icon.png`) }}">
  <link rel="manifest" href="{{ urlFor(`/manifest.webmanifest`) }}">
  <meta name="theme-color" content="#064c5c">

  {{ yield head() }}
</head>

<body data-turbo="false"
 class="
  no-js bg-app-bg text-app-fg font-sans leading-tight tracking-normal
  relative
  print:text-black print:bg-white
  overscroll-none
 ">
<script nonce="{{ cspNonce }}">
if ('noModule' in HTMLScriptElement.prototype) {
  document.body.classList.remove("no-js")
  document.body.classList.add("js")
}
</script>
{{ yield body() }}
</body>
</html>
